//问题场景:
// 1.打车时，可以打专车或者快车，任何车都有车牌号和名称
// 2.不同车价格不同，快车每公里1元，专车每公里2元
// 3.行程开始时，显示车辆信息
// 4.行程结束时，显示打车金额

class Car{
    constructor(number,name){
        this.number = number
        this.name = name
    }
}
class kuaiche extends Car{
    constructor(number,name){
        super(number,name)
        this.price = 1
    }
}
class zhuanche extends Car{
    constructor(number,name){
        super(number,name)
        this.price = 2
    }
}
class  Trip {
    constructor(car){
        this.car = car
    }
    start(){
        console.log(`车辆信息:${ this.car.number } ${ this.car.name }`)
    }
    end(){
        console.log("行程价格:"+ this.car.price * 5)
    }
}

let mycar = new kuaiche(100,"奥迪")
let mytrip = new Trip(mycar)
mytrip.start()
mytrip.end()
export default {
    Car,
    kuaiche,
    zhuanche,
    Trip
}